/*
** ############################################################################
**     Project   : osdee - Operative Systems Design for Embedded Envrionments
**     File      : Gpt_Cfg.c
**     Revision  ; 1.0
**     Abstract  :
**         GPT Configuration implementation.
**         Here the GPT operation parameters should be adapted.
**     Processor : MC9S12XEP100CVL
**     Version   : Component 01.042, Driver 01.05, CPU db: 3.00.036
**     Datasheet : MC9S12XEP100 Rev. 1.19 12/2008
**
**     Copyright : 2014 Fernando Rodriguez, Open source with out any responsability.
**     
**     mail      : frr@gmail.com
** ############################################################################
*/

#include "Gpt_Cfg.h"

extern void SchM_OsTick(void);

/*
** ===================================================================
**     Type        :  tsGPT_Configuration
**
**     Description :
**         GPT General Configuration.
**         Here is where channels properties can be specified. 
**         Do not remove or add channels arbitrary!!!.
** ===================================================================
*/
tsGPT_Configuration mal_mcu_tGPT_configuration = 
{
  TRUE,                            /* If TRUE, GPT configuration will be loaded */
  /* Channels Configuration*/
  {
    /* Channel 0 Configured to be used by the Os Tick*/
    {
      {  
        PIT0,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel0_Callback   /* Interruption Callback             */
      },
      TRUE,                         /* Shall be initialized              */
      TRUE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 1 */
    {
      {
    
        PIT1,                       /* Channel Id                        */
        7810,                        /* Period (micro seconds)            */
        PIT_Type_HihgPeriod,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel1_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 2 */
    {
      {  
        PIT2,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel2_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 3 */
    {
      {  
        PIT3,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel3_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 4 */
    {
      {  
        PIT4,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel4_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 5 */
    {
      {
    
        PIT5,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel5_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 6 */
    {
      {  
        PIT6,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel6_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    },
    /* Channel 7 */
    {
      {  
        PIT7,                       /* Channel Id                        */
        500,                        /* Period (micro seconds)            */
        PIT_Type_HihgResolution,    /* Channel type: HigRes or HigPeriod */
        Mcu_GPT_Channel7_Callback   /* Interruption Callback             */
      },
      FALSE,                        /* Shall be initialized              */
      FALSE,                        /* Shall be started                  */
      FALSE                         /* Shall its interruption be enabled */
    }
  }
};


